home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Think C dcmd 1.0.1 ƒ / Think Put Lib source / PutUHexLong.c < prev    next >
Encoding:
Text File  |  1994-06-12  |  291 b   |  15 lines  |  [TEXT/KAHL]

  1. void PutText(const char* s, int len );
  2. void __HexToText (unsigned long hex, char* str, short size  /* 0=word, 1=long */ );
  3.  
  4.  
  5. void PutUHexLong (unsigned long i, int nz)
  6. {
  7.         char*     str = "00000000";
  8.     
  9.     if ( nz > 0 && nz <= 8 )
  10.     {
  11.         __HexToText (i, str, 1 );
  12.     
  13.         PutText( &str[8-nz], nz );
  14.     }
  15. }